package com.xcdh.ittools.service;

import com.api.ittools.entity.Tables;
import com.api.ittools.entity.ToolDatasource;
import com.api.ittools.query.DbQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * DataBaseMataDataService
 * Created by wjg on 2024/4/10.
 */
@Service
public class DataBaseMataDataService {
    @Autowired
    private ToolDatasourceService toolDatasourceService ;
    @Autowired
    private MataDataService oracleMataDataService ;

    public  Tables getTable(DbQuery query){
        ToolDatasource datasource = toolDatasourceService.getById(query.getDsId());
        String dsUrl = datasource.getDsUrl();
        String type = datasource.getDbType();
        if("oracle".equals(type)){
            oracleMataDataService.getTable(query.getDataBaseName() , query.getTableName()) ;
        }else{

        }
        return null;
    }
}
